import base from '../base' // 导入接口域名列表
import axios from '@/common/utils/http' // 导入http中创建的axios实例

const bet = {
  /*
  * @param {Object} params - {code, token}
  * **/
  betList (params) {
    return axios.get(`${base.base_api}/bet/bets/`, {
      params: params
    })
  },
  betDetail (id, params) {
    return axios.get(`${base.base_api}/bet/bets/${id}/`, {
      params: params
    })
  },
  orderList (params) {
    return axios.get(`${base.base_api}/bet/orders/`, {
      params: params
    })
  },
  orderDetail (id, params) {
    return axios.get(`${base.base_api}/bet/orders/${id}/`, {
      params: params
    })
  },
  oddsList (params) {
    return axios.get(`${base.base_api}/bet/odds/`, {
      params: params
    })
  },
  oddsDetail (id, params) {
    return axios.get(`${base.base_api}/bet/odds/${id}/`, {
      params: params
    })
  }
}

export default bet
